#include<stdio.h>
#include<time.h>
#include<math.h>
int main(int argc, char const *argv[])
{
    int pos;
    srand(time(NULL));
    pos = rand() %100 + 1;
    int cai=0;
    int max=100;
    int min=0;
    while(1)
    {
        printf("请输入你才的数值");
        scanf("%d",&cai);
        if(cai>=max || cai<=min)
        {
            printf("不要乱猜\n");
            continue;
        }
        if(cai==pos)
        {
         printf("恭喜你猜对了\n");
         break;
        }
        else if(cai>pos)
        {
            printf("猜大了\n");
        }
        else if(cai<pos)
        {
            printf("猜小了\n");
        }
    }
    return 0;
}